import {
  api,
  util,
  storage
} from "../util";
import authorize from './authorize.js'
const app = getApp();
/**运费 */
const annex = {
  /**获得运费配置 */
  getfeemode( callback) {
    var entity = authorize.getEntity();
    var param = {
      FKFlag: app.dns.proprietor,
      FKId: app.dns.proprietorId,
      Token: entity.manager.Token,
      Proprietor: app.dns.proprietor,
      ProprietorId: app.dns.proprietorId,
    };
    util.post("annex.delivery.getfeemode", param, function (res) {
      res = res.data;
      if (callback != undefined && typeof (callback) == "function") {
        callback(res);
      }
    }, "3.0",null,false);
  },
  /**是否免邮 */
  isFreeFreight(callback) {
    var entity = authorize.getEntity();
    var param = {
      Token: entity.manager.Token,
      Proprietor: app.dns.proprietor,
      ProprietorId: app.dns.proprietorId
    };
    util.post("store.shop.b2borderfreefreight", param, function (res) {
      res = res.data;
      if (callback != undefined && typeof (callback) == "function") {
        callback(res);
      }
    }, "3.0", null, false);
  },
}
export{
  annex
}